import chalk from "chalk";

/**
 * log
 * @param color
 * @param message
 */
export function log(color, message) {
    console.log(chalk[color](message));
}

/**
 * 重新打包加载时log
 */
export function logRebuild() {
    log('green', `
   ✅      minipack is rebuilding...   everything will update
    `)
}

/**
 * 配置项配置错误 log
 * @param item
 */
export function logConfigError(item) {
    log('red', `
            
❗ ${item} 配置项有误
            
               `);
    process.exit(1)
}